home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 49
/
Volume 49 - JOGO DISK .iso
/
Games
/
feverfrenzy-demo.swf
/
scripts
/
DefineSprite_148
/
frame_1
/
DoAction.as
Wrap
Text File
|
2007-09-28
|
2KB
|
131 lines
function reset()
{
mReceiptArray = new Array();
gotoAndStop("empty");
}
function blink()
{
gotoAndStop("blink");
play();
}
function stopblink()
{
gotoAndStop("empty");
}
function consume()
{
gotoAndStop("empty");
}
function receive()
{
gotoAndStop("full");
}
function getNextReceipt()
{
if(mReceiptArray.length == 0)
{
return null;
}
receita = mReceiptArray.shift();
if(mReceiptArray.length == 0)
{
consume();
}
return receita;
}
function addReceipt(novas)
{
if(novas.length == 0)
{
return undefined;
}
i = 0;
while(i < novas.length)
{
mReceiptArray.push(novas[i]);
i++;
}
receive();
}
function liberaPaciente(paciente)
{
pula = 0;
i = 0;
while(i < mReceiptArray.length)
{
if(pula > 0)
{
mReceiptArray[i - pula] = mReceiptArray[i];
}
if(mReceiptArray[i].id == paciente.getID())
{
pula++;
}
i++;
}
i = 0;
while(i < pula)
{
mReceiptArray.pop();
i++;
}
if(mReceiptArray.length == 0)
{
consume();
}
}
function pausa()
{
mbPaused = true;
}
function continua(elapsed)
{
mbPaused = false;
}
stop();
var mReceiptArray;
if(mReceiptArray == undefined)
{
mReceiptArray = new Array();
}
mMouseMask_mc._visible = false;
var lastMouseIn = false;
this.onMouseMove = function()
{
if(mbPaused)
{
return undefined;
}
var _loc3_ = {x:this._xmouse,y:this._ymouse};
this.localToGlobal(_loc3_);
if(mMouseMask_mc.hitTest(_loc3_.x,_loc3_.y,false))
{
if(!lastMouseIn)
{
lastMouseIn = true;
_root.cursor_mc.setOver2(this);
}
}
else if(lastMouseIn)
{
lastMouseIn = false;
_root.cursor_mc.setNotOver2(this);
}
};
this.onMouseDown = function()
{
if(mbPaused)
{
return undefined;
}
var _loc4_ = {x:this._xmouse,y:this._ymouse};
this.localToGlobal(_loc4_);
if(mMouseMask_mc.hitTest(_loc4_.x,_loc4_.y,false))
{
_root.Sons.gotoAndStop("click");
_parent.moveToReceipt();
stopblink();
}
};
var mbPaused = false;